﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Teamplate.Master" AutoEventWireup="true" CodeBehind="ThanhToan.aspx.cs" Inherits="WebNhaXuatBan.ThanhToan" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<a style="margin-left:30px;" href="default.aspx"><img src="Images/Folder-Home-Folder-icon.png" alt="Group EM09" /></a>
<img style="margin-left:30px;" src="Images/ThanhToan.png" alt="Group EM09" />
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
 <div style="width:980px; margin-left:auto; margin-right:auto; border:1px solid #bad9eb;">
<div style="width:980px;height:30px; background-image:url(../Images/ThanhTieuDe.png);"></div>
<div style="height:20px;margin-top:5px;margin-left:5px;margin-bottom:10px;">
 </div>       
<div id="BODY">
<%
    float tongTien = 0;
    BUS.SachBUS sb = new BUS.SachBUS();
    if (Session["GioHang"] != null)
    {
        BUS.SachBUS sach = new BUS.SachBUS();
        ArrayList dssach = (ArrayList)Session["GioHang"];
        for (int j = 0; j < dssach.Count; j++)
        {%>
   <br />
   <hr />
   <div style="height:300px;margin-top:5px;margin-left:5px;width:100%;">
   <div style="height:300px;float:left;width:300px;">
   <a href="#"><img src="<%=sb.LaySachTheoMaSach(((DTO.ChiTietGioHangDTO)dssach[j]).MaSach).FileHinh %>" alt="<%=sb.LaySachTheoMaSach(((DTO.ChiTietGioHangDTO)dssach[j]).MaSach).FileHinh %>") /></a>
   </div>
   <div style="height:300px;float:left;width:600px;">
   <span style="color:#366276; font-size:30px;"><%=sb.LaySachTheoMaSach(((DTO.ChiTietGioHangDTO)dssach[j]).MaSach).TenSach%></span>
   <br />
   Tác Giả:<%=" " + sb.LaySachTheoMaSach(((DTO.ChiTietGioHangDTO)dssach[j]).MaSach).TacGia%>
   <br />
   <span style="color:red;">Giá Bán:<%= " " + sb.LaySachTheoMaSach(((DTO.ChiTietGioHangDTO)dssach[j]).MaSach).GiaBan%>$</span>
   <br />
   <span style="color:red;">Số Lượng:<%= " " + ((DTO.ChiTietGioHangDTO)dssach[j]).SoLuong%>$</span>
   <br />
   <%float tong = ((DTO.ChiTietGioHangDTO)dssach[j]).SoLuong * sb.LaySachTheoMaSach(((DTO.ChiTietGioHangDTO)dssach[j]).MaSach).GiaBan;
     tongTien += tong;
             %>
   <span style="color:red;">Tổng Tiền:<%= " " + tong%>$</span>
   <br />
   </div>
   </div>
   <%} %>
   <hr />
   <div style="height:250px;margin-top:5px;margin-left:5px;width:100%;">
   <div style="height:60px;float:left;width:300px;">
       <asp:ImageButton ID="ImageButton1" runat="server" 
           ImageUrl="~/Images/ThanhToanGioHang.png" onclick="ImageButton1_Click" />
   </div>
   <div style="height:60px;float:right;width:600px;">
   <span style="color:red;">Tổng Tiền:<%=" "+tongTien %>$</span>
   <br />
   <br />
    Thông Tin Giao Hàng
    <br />
    <br />
    Họ Tên:<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
    <br />
    <br />
    Địa Chỉ:<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
    <br />
    <br />
    ĐTLH:<asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>
    <br />
    <br />
    <asp:Button ID="Button1" runat="server" Text="Cập Nhật Thông Tin" 
           onclick="Button1_Click" />
   </div>
   </div>
   <div style="width:980px;height:10px;"></div>
   <%} %>
</div>
</div>
</asp:Content>
